package com.zl.common;

import com.zl.util.PropertiesHelper;

/**
 * 读取应用配置文件
 */
public class Config {

	private static Config instance = new Config();

	private static final String customFile = "classpath:/app.properties";

	static PropertiesHelper customProperties;

	public static Config getInstance() {
		return instance;
	}

	/**
	 * 私有化构造方法
	 */
	private Config() {
		// 调用读取配置文件的方法
		customProperties = new PropertiesHelper(customFile);
	}

	/**
	 * 取AppCustom.properties中的Value，内存读取
	 * 
	 * @param key
	 * @return
	 */
	public String getCustomValue(String key) {
		return customProperties.getPropertyWithUTF8(key);
	}
	
}
